home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lantools / blueprnt / bptime.pas < prev    next >
Pascal/Delphi Source File  |  1989-10-16  |  1KB  |  36 lines

  1. program set_time_from_server;
  2. (*************************************************************
  3. * Set Time using Time on Specifed Server                     *
  4. * by Craig Chaiken                  (BPTIME.PAS, BPTIME.EXE) *                             *
  5. * October 3, 1989                                            *
  6. *                                                            *
  7. * Function:                                                  *
  8. *     This program reads the number of ticks since midnight, *
  9. *     a 32 bit number at location 0000:046C, from the        *
  10. *     server, and set this client to match.                  *
  11. *                                                            *
  12. * Command Format:                                            *
  13. *     BPTIME /socket_number                                  *
  14. *************************************************************)
  15. uses dos;
  16. {$I bppascal.inc}
  17. var
  18.     temp:integer;
  19.  
  20. begin
  21.     socket_number:=get_opt(1);
  22.     packet_buffer[0]:=ord('r');
  23.     packet_buffer[1]:=$6c;
  24.     packet_buffer[2]:=4;
  25.     packet_buffer[3]:=0;
  26.     packet_buffer[4]:=0;
  27.     packet_buffer[5]:=4;
  28.     packet_buffer[6]:=0;
  29.     packet_length:=7;
  30.     put_packet(socket_number);
  31.     temp:=get_packet(socket_number);
  32.     mem[0:$46c]:=packet_buffer[1];
  33.     mem[0:$46d]:=packet_buffer[2];
  34.     mem[0:$46e]:=packet_buffer[3];
  35.     mem[0:$46f]:=packet_buffer[4];
  36. end.